<extend name="user"/>

<block name="user_right">
	<div class="goods-list am-g ">
		<volist name='goods' id='vo'>

			<div class="item">
				<div class="goods-pic">

					<if condition="$config.SHOW_GOODS_DETAIL gt 0">
						<a target="_blank" class="pic-img" href="{$vo.url}">
							<img class="lazy am-img-responsive"" data-original="{$vo.pic_url|get_image_url}" src="__IMG__/loading.jpg" alt="{$vo.name}" style="display: inline;">
						</a>
						<else/>
						<notempty name="vo.click_url">

							<a class="pic-img"  href="{$goods['click_url']}" target="_blank">
								<img class="lazy am-img-responsive"" data-original="{$vo.pic_url|get_image_url}" src="__IMG__/loading.jpg" alt="{$vo.name}" style="display: inline;">
							</a>
							<else/>
							<a href="{:U('Goods/goBuy',array('id'=>$vo['num_iid']))}" target="_blank">
								<img class="lazy am-img-responsive"" data-original="{$vo.pic_url|get_image_url}" src="__IMG__/loading.jpg" alt="{$vo.name}" style="display: inline;">
							</a>
						</notempty>
					</if>

				</div>

				<p class="title">
					<if condition="$config.SHOW_GOODS_DETAIL gt 0">
						<a target="_blank" class="black" href="{$vo.url}">{$vo.name}</a>
						<else/>
						<notempty name="vo.click_url">
							<a class="black"  href="{$goods['click_url']}" target="_blank">{$vo.name}</a>
							<else/>
							<a  href="{:U('Goods/goBuy',array('id'=>$vo['num_iid']))}" target="_blank">{$vo.name}</a>
						</notempty>
					</if>

				</p>
				<div class="goods-price">
					<b class="price">
						￥{$vo['price']}
					</b>
				<span class="market-price">
					<del>
						<em>￥</em>
						{$vo['market_price']}
					</del>

				</span>
				</div>
				<div class="keyword">

				</div>
				<div class="volume">
					月销<b>{$vo['volume']}</b>
				</div>
				<!-- like -->
				<a href="javascript:;" data-title="{$vo.name}" onclick="favor({$vo['id']})" data-key="" title="加入收藏" class="y-like my-like active">
					<i class="like-ico l-active"><span class="heart_left"></span><span class="heart_right"></span></i>
				</a>
				<!-- end like -->
				<eq name="vo.recommend" value="1">
					<span class="recommend">推荐</span>
					<else/>
					<eq name="vo.new" value="1">
						<span class="recommend">新品</span>
					</eq>
				</eq>
			</div>
		</volist>


	</div>
	<notempty name="_page">
		<ul class="am-g am-pagination">
			{$_page}
		</ul>
	</notempty>

</block>
<block name="script">
	<script>

	$(".goods-list li").hover(
			function(){
				//当鼠标放上去的时候,程序处理
				$(this).addClass("hover1 hover");
			},
			function(){
				//当鼠标离开的时候,程序处理
				$(this).removeClass("hover1 hover");
	});
	function unfavor(goodsid){
		$.get("{:U('ajax/unFavor')}",{id:goodsid},function(json){
			showmsg(json.info);
			setTimeout("window.location.reload()",1500);
		})
	}
	$('.am-nav').find('a[href="'+'{:U("favor")}'+'"]').closest('li').addClass('am-active');
</script>
</block>